home *** CD-ROM | disk | FTP | other *** search
- /*
- *--- PGetPrivateList.cpp -------------------------------------------------
- * Copyright (c) 1995-96 Adobe Systems Incorporated. All rights reserved.
- * Created on Thu, Oct 12, 1995 @ 10:00 PM by Paul Ferguson.
- *
- * Description: For notes about this class, refer to the
- * PCL documentation file PGetPrivateList.html
- *-------------------------------------------------------------------------
- */
-
- #include <string.h>
-
- #include "PMCQErrs.h"
- #include "PGetPrivateList.h"
- #include "PQuery.h"
- #include "PRequestBuf.h"
- #include "PReplyBuf.h"
-
-
- PGetPrivateList::PGetPrivateList
- ( const char * sDeveloperID,
- const char * sPluginID,
- short cTargetClass,
- unsigned long nTypeFlag,
- unsigned long nTargetID )
-
- : PListQuery()
-
- {
- if (strlen(sDeveloperID) != 4 || strlen(sPluginID) != 4)
- throw CQ_INVALID_CQ_ARG;
-
- PRequestBuf request(100); // plenty big to hold everything.
- request << sDeveloperID
- << sPluginID
- << cTargetClass
- << nTypeFlag
- << nTargetID;
-
- // NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE!
- // If the object has no private data, an exception
- // (CQ_NOPDATA) will be thrown. If you don't want
- // your plug-in to fail, you must handle the exception.
- PQuery query(pm_getprivatelist, request, itsHandle);
-
- InitHandle();
- InitListMom();
- Scan();
- }
-
-
- void PGetPrivateList::Scan()
- {
- PReplyBuf reply(listMom.Current());
-
- reply >> &devID
- >> &pluginID
- >> targetClass
- >> typeFlag
- >> targetID
- >> cPlatform
- >> nSize;
-
- listMom.Update(reply);
- }
-
- // end of PGetPrivateList.cpp
-